﻿using Inovout.Cloud.DataWarehouse.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Inovout.Cloud.DataWarehouse.Utility
{
    public sealed class StringUtils
    {

        public static string EncodeTableName(string dataSourceName, string originalDataViewName)
        {
            return dataSourceName + Constants.LinkTableChar + originalDataViewName;
        }

        public static string DecodeTableName(string dataViewName)
        {
            string result = dataViewName.Substring(dataViewName.IndexOf('_') + 1, dataViewName.Length - (dataViewName.IndexOf('_') + 1));
            return result;
        }
    }
}
